home *** CD-ROM | disk | FTP | other *** search
- # test unkwonw command
-
- # proc unknown.old {} {
- # }
- #
- # global tclMotif_unknown
- #
- # set tclMotif_unknown "unknown"
- #
- # while {[info commands $tclMotif_unknown] != ""} {
- # set tclMotif_unknown $tclMotif_unknown.old
- # }
- # puts stdout "new name: $tclMotif_unknown"
- #
- #
- # rename unknown $tclMotif_unknown
- #
- # proc unknown {name args} {
- # global tclMotif_unknown
- #
- # set cmds [info commands $name]
- # set len [llength $cmds]
- # if {$len == 0} {
- # set cmd "uplevel 1 unknown.old $name $args"
- # puts "cmnd: $cmd"
- # eval $cmd
- # }
- # if {$len > 1} {
- # error "non-unique command \"$name\" matches \"$cmds\""
- # }
- # uplevel $cmds $args
- # }
-
- proc fred {a b} {
- puts stdout fred
- }
-
- xtAppInitialize -class Program
-
- xmForm .form managed
- xmRowColumn .form.rc managed
- xmPushButton .form.rc.fred managed
-
- .*fred activateCallback {puts stdout "ouch"}
-
- . realizeWidget
-
- . mainLoop
-